from selenium import webdriver
from selenium.webdriver.chrome.service import Service


def chrome():
    driver_path = Service(r'D:\noDelete\chromedriver-win64\chromedriver.exe')
    options = webdriver.ChromeOptions()
    options.add_experimental_option("detach",True)
    browser = webdriver.Chrome(service=driver_path, options=options)
    browser.get("https://www.baidu.com/")
    print("返回页面", browser.page_source)


if __name__ == '__main__':
    chrome()
